<%@ taglib prefix="html" uri="/WEB-INF/struts-html.tld"%>
<%@ taglib prefix="bean" uri="/WEB-INF/struts-bean.tld"%>
<%@ taglib prefix="logic" uri="/WEB-INF/struts-logic.tld"%>

<h1>User Registration</h1>
<html:form action="/Users/CreateOrUpdate" styleId="registrationForm" >
    <html:hidden property="id"/>
    Fields below are required. You must specify a login that you wish to use, as well as a
    password. The password cann not be less than eight characters long. Try also to keep 
    it comlicated so that no one could guess it.
    <table class="FormTable">
        <tr>
            <td>
                Proposed Login:
            </td>
            <td>
                <div class="errorMessage"><html:errors property="login"/></div>
                <html:text property="login" styleClass="whiteBg"/>
            </td>
        </tr>
        <tr>
            <td>
                Password:      
            </td>
            <td><div class="errorMessage"><html:errors property="password"/></div>
                <html:password property="password" styleClass="whiteBg"/>
            </td>
        </tr>
        <tr>
            <td>
                Repeat password:
            </td>
            <td>
                <div class="errorMessage"><html:errors property="password2"/></div>
                <html:password property="password2" styleClass="whiteBg"/>
            </td>
        </tr>
        <tr>
            <td>
                E-mail:         
            </td>
            <td>
                <div class="errorMessage"><html:errors property="email"/></div>
                <html:text property="email" styleClass="whiteBg"/>
            </td>
        </tr>
        <tr>
            <td>
                
            </td>
            <td>
                <a class="button" href="javascript:document.getElementById('registrationForm').reset()">Reset</a>
                <a class="button" href="javascript:document.getElementById('registrationForm').submit()">Submit</a>
            </td>
        </tr>
    </table>
    
    
    <h2>Additional information.</h2>
    Those fields are optional.
    <table class="FormTable">
        <tr><td>Name:</td><td><html:text property="name" styleClass="whiteBg" value="Arek"/></td></tr>
        <tr><td>Surname:   </td><td><html:text property="surname" styleClass="whiteBg" value="Dziadura"/></td></tr>
        <tr><td>Sex:   </td><td><html:select property="sex" styleClass="whiteBg">
                    <html:option value="M">Male</html:option>
                    <html:option value="F">Female</html:option>
        </html:select></td></tr>
        <tr><td>Birth date: </td><td><html:text property="birthDate" styleClass="whiteBg"/></td></tr>
        <tr><td>Phone no.:  </td><td><html:text property="phoneno" styleClass="whiteBg" /></td></tr>
        <tr><td>Mobile no.:</td><td><html:text property="mobileno" styleClass="whiteBg" /></td></tr>
        <tr><td>City:      </td><td><html:text property="city" styleClass="whiteBg"/></td></tr>
        <tr><td>Zip code:  </td><td><html:text property="zipcode" styleClass="whiteBg"/></td></tr>
        <tr><td>Street:    </td><td><html:text property="street" styleClass="whiteBg"/></td></tr>
        <tr><td></td><td>
                <a class="button" href="javascript:document.getElementById('registrationForm').reset()">Reset</a>
                <a class="button" href="javascript:document.getElementById('registrationForm').submit()">Submit</a>
        </td></tr>
    </table>
    
    
</html:form>
